package com.panda.cn.controller;

import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panda.cn.entity.SysLoginLogEntity;
import com.panda.cn.service.SysLoginLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Slf4j
@RestController
@RequestMapping(value = "/sys/loginlogcon")
public class SysLoginLogController {
    
    @Resource
    private SysLoginLogService sysLoginLogService;
    
    /**
     * 列表
     *
     * @return {@link List}
     */
    @RequestMapping(value = "/pageList", method = RequestMethod.POST)
    public Page<SysLoginLogEntity> pageList(@RequestBody JSONObject params) {
        return sysLoginLogService.pageList(params);
    }
    
    /**
     * 逻辑删除
     *
     * @param params 参数个数
     * @return {@link Long}
     */
    @RequestMapping(value = "/remove", method = RequestMethod.POST)
    public Long remove(@RequestBody List<Long> params) {
        return sysLoginLogService.remove(params);
    }
    
}
